import 'reflect-metadata'
import { InversifyExpressServer } from 'inversify-express-utils'
import { Container } from 'inversify'

import { User } from './user/controller'
import { UserService } from './user/services'
//实例化
const container = new Container()
container.bind(User).to(User)
container.bind(UserService).to(UserService)

const server = new InversifyExpressServer(container)

const app = server.build()

app.listen(3000, () => {
    console.log('server in running at 3000');
})